package com.zlyx.easy.http.models;

import com.zlyx.easy.core.map.ObjectMap;

/**
 * 
 * @Auth 赵光
 * @Describle
 * @2019年12月25日
 */
public class RequestModel {

	private String id;

	/**
	 * 服务接口
	 */
	private Class<?> cls;

	/**
	 * 请求地址
	 */
	private String[] urls;

	/**
	 * 请求方式
	 */
	private String method;

	/**
	 * 远程地址
	 */
	private String ip;

	/**
	 * 远程端口
	 */
	private int port;

	/**
	 * 请求参数
	 */
	private ObjectMap params;

	/**
	 * 返回类型
	 */
	private Class<?> returnType;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Class<?> getCls() {
		return cls;
	}

	public void setCls(Class<?> cls) {
		this.cls = cls;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String[] getUrls() {
		return urls;
	}

	public void setUrls(String[] urls) {
		this.urls = urls;
	}

	public ObjectMap getParams() {
		return params;
	}

	public void setParams(ObjectMap params) {
		this.params = params;
	}

	public Class<?> getReturnType() {
		if (returnType == void.class) {
			return String.class;
		}
		return returnType;
	}

	public void setReturnType(Class<?> returnType) {
		this.returnType = returnType;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

}
